<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!doctype html>
<html>

<head>
    <meta charset="UTF-8" />
    <title>登记商品</title>
    <link rel="stylesheet" type="text/css" href="http://localhost:8080/back/css/common.css" />
    <link rel="stylesheet" type="text/css" href="http://localhost:8080/back/css/main.css" />
</head>

<body>

<%--
<script>
    //定义存放所有商品大类型数据的数组
    var categoryList =['==请选择==',"北京市","江西省","湖北省"];

    //定义存放所有商品小类型的二维数组
    var typeList=[
        ["==请选择=="],
        ["东城区","西城区","朝阳区"],
        ["南昌市","九江市","上饶市"],
        ["武汉市","荆州市"],
    ];


    //定义加载省份下拉框的方法loadProvince
    function loadCategory(){
        //遍历provinceList数组中的元素
        //动态增加选项option到下拉框goods_category中
        //1.1获得商品大类型下拉框对象
        var goods_Category = document.getElementById("goods_Category");
        //1.2设置商品大类型下拉框下拉选项的个数
        goods_Category.length = categoryList.length;
        //1.3遍历categoryList数组
        for(var i=0;i<categoryList.length;i++){
            //设置下拉框选项显示的内容
            goods_Category.options[i].text= categoryList[i];
        }
    }

    //定义根据当前选择的商品大类型，加载对应市下拉框数据的方法
    function loadType(){
        //1.获得所选择的商品大类型选项序号
        var idx = document.getElementById("goods_Category").selectedIndex;

        //2.从cityList数组中，取idx行所在的数据
        var typeData = typeList[idx];

        //3.遍历cityData中的数据，载入到商品小类型下拉框goods_City中
        var goods_Type = document.getElementById("goods_Type");
        goods_Type.length = typeData.length;
        for(var i=0;i<typeData.length;i++){
            goods_Type.options[i].text = typeData[i];
        }
    }

    //执行加载商品大类型下拉框的方法
    loadCategory();
</script>
--%>

<%@include file="../common/header.jsp"%>
<div class="container clearfix">
    <%@include file="../common/menu.jsp"%>

    <div class="main-wrap">

        <div class="crumb-wrap">
            <div class="crumb-list"><i class="icon-font"></i><a href="http://localhost:8080/back/index.jsp">首页</a><span
                    class="crumb-step">&gt;</span><a class="crumb-name" href="../goods/getAllGoods">商品管理</a><span
                    class="crumb-step">&gt;</span><span>登记商品</span></div>
        </div>
        <div class="result-wrap">
            <div class="result-content">
                <form action="../goods/add.do" method="post" id="myform" name="myform">
                    <table class="insert-tab" width="100%">
                        <tbody>
                        <tr>
                            <th width="120"><i class="require-red">*</i>商品编号：</th>
                            <td>
                                <input class="common-text required"  name="goodsBarcode"
                                       size="50" value="" type="text">
                                <span style="color: red;"></span>
                            </td>
                        </tr>
                        <tr>
                            <th><i class="require-red">*</i>商品名称：</th>
                            <td>
                                <input class="common-text required"  name="goodsName"
                                       size="50" value="" type="text">
                                <span style="color: red;"></span>
                            </td>
                        </tr>
                        <tr>
                            <th width="120"><i class="require-red">*</i>品牌：</th>
                            <td>
                                <input class="common-text required"  name="brand"
                                       size="50" value="" type="text">
                                <span style="color: red;"></span>
                            </td>
                        </tr>
                        <tr>
                            <th width="120"><i class="require-red">*</i>商品类型：</th>
                            <td>
                                <label for="type">选择商品类型:</label>
                                <select name="goodsTypeId" id="type">
                                    <option value="1">上衣</option>
                                    <option value="2">可穿戴设备</option>
                                    <option value="3">早餐食品</option>
                                    <option value="4">书房家具</option>
                                    <option value="5">护肤品</option>
                                    <option value="6">鞋类</option>
                                    <option value="7">智力玩具</option>
                                </select>
                                <span style="color: red;"></span>
                            </td>
                        </tr>

                        <tr>
                            <th width="120"><i class="require-red">*</i>商品规格：</th>
                            <td>
                                <input class="common-text required" id="" name="goodsSprecification"
                                       size="50" value="" type="text">
                                <span style="color: red;"></span>
                            </td>
                        </tr>
                        <tr>
                            <th width="120"><i class="require-red">*</i>制造商：</th>
                            <td>
                                <input class="common-text required"  name="manufacture"
                                       size="50" value="" type="text">
                                <span style="color: red;"></span>
                            </td>
                        </tr>
                        <tr>
                            <th width="120"><i class="require-red">*</i>产地：</th>
                            <td>
                                <input class="common-text required"  name="originalPlace"
                                       size="50" value="" type="text">
                                <span style="color: red;"></span>
                            </td>
                        </tr>
                        <tr>
                            <th width="120"><i class="require-red">*</i>备注：</th>
                            <td>
                                <input class="common-text required"  name="goodsRemark"
                                       size="50" value="" type="text">
                                <span style="color: red;"></span>
                            </td>
                        </tr>
                        <tr>
                            <th></th>
                            <td>
                                <input class="btn btn-primary btn6 mr10" value="添加" type="submit">
                                <input class="btn btn6" onClick="history.go(-1)" value="取消" type="button">
                            </td>
                        </tr>
                        </tbody>
                    </table>



                </form>
            </div>
        </div>
    </div>
</div>
<%@include file="../common/footer.jsp"%>
</body>

</html>